LIB_EXT=.so
MODULE_EXT=.so
BIN_EXT=

all:
	$(MAKE) newsyndrome


newsyndrome:
	cd src/libtd_bdd && $(MAKE)
	mv src/libtd_bdd/libtd_bdd$(LIB_EXT) src/libtd_bdd/browser/libtd_bdd$(LIB_EXT)
	
	cd src/libtd_bdd/browser && $(MAKE)
	mv src/libtd_bdd/browser/libtd_bdd$(LIB_EXT) .
	mv src/libtd_bdd/browser/td_browser$(BIN_EXT) .
	cp src/libtd_bdd/browser/td_browser.sh .
	cp libtd_bdd$(LIB_EXT) src/libtd_bdd$(LIB_EXT)
	
	cd src && $(MAKE)
	cp src/libtd_bdd$(LIB_EXT) src/modules/libtd_bdd$(LIB_EXT)
	
	cd src/modules && $(MAKE)
	mv src/modules/*$(MODULE_EXT) modules
	

clean:
	rm -rf src/libtd_bdd/browser/*.o
	rm -rf src/libtd_bdd/browser/*.*~
	rm -rf src/libtd_bdd/browser/*.dll
	rm -rf src/libtd_bdd/browser/*.so
	rm -rf src/libtd_bdd/browser/*.dylib
	rm -rf src/libtd_bdd/*.o
	rm -rf src/libtd_bdd/*.*~
	rm -rf src/libtd_bdd/*.dll
	rm -rf src/libtd_bdd/*.so
	rm -rf src/libtd_bdd/*.dylib
	rm -rf src/modules/*.o
	rm -rf src/modules/*.*~
	rm -rf src/modules/*.so
	rm -rf src/modules/*.dll
	rm -rf src/modules/*.dylib
	rm -rf src/*.o
	rm -rf src/*.*~
	rm -rf src/*.so
	rm -rf src/*.dll
	rm -rf src/*.dylib
	rm -rf *.log
	
